import { requestClient,requestClientBody } from '#/api/request';

/**
 * 获取协议列表
 */
export async function getListApi() {
  return requestClient.get('/agreement/lists');
}
  
/**
 * 新增协议
 */
export async function createApi(data: any) {
  return requestClientBody.post('/agreement/add', {form:data});
}

/**
 * 编辑协议
 */
export async function editApi(data: any) {
  return requestClientBody.post('/agreement/edit?id='+data.id, {form:data});
}

/**
 * 删除协议
 */
export async function deleteApi(id: number) {
  return requestClientBody.post('/agreement/delete?id='+id);
}

/**
 * 协议详情
 */
export async function detailApi(id: number) {
  return requestClient.get('/agreement/detail?id='+id);
}
/**
 * 协议详情
 */
export async function detailByNameApi(name: string) {
  return requestClient.get('/agreement/detailbyname?name='+name);
}